package edu.ptu.communityplatform.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @BelongsProject: communityPlatform
 * @BelongsPackage: edu.ptu.communityplatform.domain.entity
 * @Author: HYJ
 * @CreateTime: 2025-04-04  23:56
 * @Description: TODO
 * @Version: 1.0
 */
@Data
public class User implements Serializable {
    private static final long serialVersionUID = -46697161206098667L;

    /**
     * 用户ID（主键自增）
     */
    @TableId(type = IdType.AUTO)
    private Long userId;


    /**
     * 登录密码
     */
    private String password;
    /**
     * 账号
     */
    @TableField("username")
    private String userName;

    /**
     * 逻辑删除标志（0-未删除，1-已删除）
     * 插入时自动填充默认值
     */
    @TableLogic
    private Integer isDeleted;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 备注
     */
    private String remark;
}
